package com.googlecode.archimedes.filegen.controller;

import java.util.Collection;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.googlecode.archimedes.filegen.model.Asset;
import com.googlecode.archimedes.filegen.template.Template;
import com.googlecode.archimedes.filegen.template.TemplateException;

/**
 * A Bridge Merges 
 * - Templates
 * - Assets
 * - Filters
 * - ResourceLocations
 * 
 * @author John Lema, Erik Gustavson
 * @version $Id: GenerationBridge.java 1983 2006-01-30 21:18:21 +0000 (Mon, 30 Jan 2006) erik $
 */

public abstract class GenerationBridge {

	Log log = LogFactory.getLog(this.getClass());

	private String outputDirectoy;
	private String resourceDirectory;
	private String loggingDirectory;
	private String includeDirectory;
	
	/**
	 * Adds a single template file.
	 * 
	 * @param template The template to add.
	 */
	public abstract void addTemplate(Template template)  throws TemplateException;
	
	/**
	 * Adds a collection of template files
	 * 
	 * @param templates The collection of templates to add.
	 */
	public abstract void addTemplates(Collection<Template> templates)  throws TemplateException;

	/**
	 * Resets the collection of templates
	 * 
	 * @param templates The collection of templates to set.
	 */
	public abstract void setTemplates(Collection<Template> templates)  throws TemplateException;
	
	/**
	 * Returns the collection of template files.
	 * 
	 * @return A Collection of template files.
	 */
	public abstract Collection<Template> getTemplates();
	
	/**
	 * Returns a Collection of all the Assets contained in the GenerationBridge.
	 * 
	 * @return A Collection of Assets.
	 */
	public abstract Collection<Asset> getAssets();
	
	/** 
	 * @return
	 */
	public String getIncludeDirectory() {
		return includeDirectory;
	}

	/**
	 * @param includeDirectory
	 */
	public void setIncludeDirectory(String includeDirectory) {
		this.includeDirectory = includeDirectory;
	}

	/**
	 * @return
	 */
	public String getLoggingDirectory() {
		return loggingDirectory;
	}

	/**
	 * @param loggingDirectory
	 */
	public void setLoggingDirectory(String loggingDirectory) {
		this.loggingDirectory = loggingDirectory;
	}

	/**
	 * @return
	 */
	public String getOutputDirectoy() {
		return outputDirectoy;
	}

	/**
	 * @param outputDirectoy
	 */
	public void setOutputDirectoy(String outputDirectoy) {
		this.outputDirectoy = outputDirectoy;
	}

	/**
	 * @return
	 */
	public String getResourceDirectory() {
		return resourceDirectory;
	}

	/**
	 * @param resourceDirectory
	 */
	public void setResourceDirectory(String resourceDirectory) {
		this.resourceDirectory = resourceDirectory;
	}
}
